<?php
namespace app\miniapp\validate;
use think\Validate;
class AddressValidate extends Validate
{
    protected $rule = [
        'id' => 'require',
        'user_id' => 'require',
        'name' => 'require',
        'mobile' => 'require',
        'area' => 'require',
        'address' => 'require',

    ];
    protected $message = [
        'id.require' => 'id不能为空',
        'user_id.require' => '用户id不能为空',
        'name.require' => '收货人姓名不能为空',
        'mobile.require' => '收货人手机号不能为空',
        'area.require' => '地区不能为空',
        'address.require' => '详细地址不能为空',

    ];
    protected $scene = [
        'add' => ['name','mobile','area','address'],
        'edit' => ['id','name','mobile','area','address'],
    ];

}